package string;

public class IndexOfDemo {
    public static void main(String[] args) {
        String str="thinking int java";
        int index=str.indexOf("ja");
        System.out.println(index);
        index=str.indexOf("in",2);
        System.out.println(index);
        index=str.indexOf("sda");
        System.out.println(index);


        index=str.lastIndexOf("va");
        System.out.println(index);
    }
}
